com.highdeal.tax.hci
Class TaxDataModel

java.lang.Object
  extended by com.highdeal.tax.hci.TaxDataModel
All Implemented Interfaces:
XMLMarshallable

public class TaxDataModel
extends java.lang.Object
implements XMLMarshallable

This Java class specifies some specific tax settings that must configured in the tax settings of a subscriber account (in customer master data of the service provider); These specific tax settings are adapted to each invoicing tax system supported by SAP Convergent Charging.

You can:

See Also:
TaxInfoModel, SubscriberAccountModel

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="taxData">
   <xs:complexType>
     <xs:choice>
       <xs:element name="eztaxData" minOccurs="0" maxOccurs="unbounded">
         <xs:complexType>
           <xs:attribute name="name" type="xs:string"/>
           <xs:attribute name="value" type="xs:string"/>
           <xs:attribute name="type" type="TaxDataType" default="string"/>
         </xs:complexType>
       </xs:element>
       <xs:element name="vatData" minOccurs="0" maxOccurs="unbounded">
         <xs:complexType>
           <xs:attribute name="name" type="xs:string"/>
           <xs:attribute name="value" type="xs:string"/>
           <xs:attribute name="type" type="TaxDataType" default="string"/>
         </xs:complexType>
       </xs:element>
     </xs:choice>
   </xs:complexType>
 </xs:element>
<xs:simpleType name="TaxDataType">
   <xs:restriction base="xs:string">
     <xs:enumeration value="string"/>
     <xs:enumeration value="number"/>
     <xs:enumeration value="date"/>
   </xs:restriction>
 </xs:simpleType>


Nested Class Summary
static class TaxDataModel.TaxDataType
          This enumeration lists the types
static class TaxDataModel.Type
          This enumeration lists the type of tax data as string, number, or date.
 
Constructor Summary
TaxDataModel()
          Builds an empty tax data.
TaxDataModel(java.lang.String taxDataStr)
          Builds an empty tax data.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 void addEZTaxData(java.lang.String name, java.lang.String value)
          Sets a description associated with a language.
 void addVatData(java.lang.String name, java.lang.String value)
          Sets a description associated with a language.
 void clear()
          Clears all descriptions associated with a language.
 java.lang.String getEZTaxData(java.lang.String name)
          Gets the description associated with the given language, if exists.
 java.lang.String getVatData(java.lang.String name)
          Gets the description associated with the given language, if exists.
 boolean hasEZTaxData()
          Returns true if the tax data is empty.
 boolean hasVatData()
          Returns true if the tax data is empty.
 boolean isEmpty()
          Returns true if the tax data is empty.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void removeEZTaxData(java.lang.String name)
          Removes a description associated with a language.
 void removeVatData(java.lang.String name)
          Removes a description associated with a language.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 java.lang.String toString()
          Returns a string representation of the tax data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaxDataModel

public TaxDataModel()
Builds an empty tax data.


TaxDataModel

public TaxDataModel(java.lang.String taxDataStr)
Builds an empty tax data.

For VAT, the CSV string contains only values ordered as follows: VAT_CUSTOMER_COUNTRY_CODE; VAT_BUSINESS_CATEGORY

For EZTax, the CSV string contains only values ordered as follows: EZTAX_ORIGINATION; EZTAX_TERMINATION; EZTAX_SERVICE_ADDRESS; EZTAX_CUSTOMER_TYPE; EZTAX_RESALE_FLAG; EZTAX_INC_CODE

Parameters:
taxDataStr - A string that contains a tax data as a CSV string
Method Detail

addVatData

public void addVatData(java.lang.String name,
                       java.lang.String value)
Sets a description associated with a language.

Parameters:
name - The name of the tax data
value - The value associated with the given tax data

addEZTaxData

public void addEZTaxData(java.lang.String name,
                         java.lang.String value)
Sets a description associated with a language.

Parameters:
name - The name of the tax data
value - The value associated with the given tax data

clear

public void clear()
Clears all descriptions associated with a language.


removeVatData

public void removeVatData(java.lang.String name)
Removes a description associated with a language.

Parameters:
name - The name of the tax data

removeEZTaxData

public void removeEZTaxData(java.lang.String name)
Removes a description associated with a language.

Parameters:
name - The name of the tax data

getVatData

public java.lang.String getVatData(java.lang.String name)
Gets the description associated with the given language, if exists.

Parameters:
name - The name of the tax data
Returns:
The value associated with the given name, if exists, null otherwise.

getEZTaxData

public java.lang.String getEZTaxData(java.lang.String name)
Gets the description associated with the given language, if exists.

Parameters:
name - The name of the tax data
Returns:
The value associated with the given name, if exists, null otherwise

isEmpty

public boolean isEmpty()
Returns true if the tax data is empty.

Returns:
true if the tax data is empty, false otherwise

hasVatData

public boolean hasVatData()
Returns true if the tax data is empty.

Returns:
true if the tax data is empty, false otherwise

hasEZTaxData

public boolean hasEZTaxData()
Returns true if the tax data is empty.

Returns:
true if the tax data is empty, false otherwise

toString

public java.lang.String toString()
Returns a string representation of the tax data.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of the tax data

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)